package com.flin.icesilkworm.examination.course.service.impl;

import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.flin.icesilkworm.examination.course.constant.ICourseTeacherConstant;
import com.flin.icesilkworm.examination.course.model.CourseTeacher;
import com.flin.icesilkworm.examination.course.service.ICourseTeacherService;
import com.flin.icesilkworm.examination.extfunc.IExtFunction;
import com.flin.icesilkworm.examination.gen.course.service.GeneratedCourseTeacherService;
import com.flin.icesilkworm.framework.utils.Md5Utils;
@Service("courseTeacherService")
@Transactional
public class CourseTeacherServiceImpl extends GeneratedCourseTeacherService implements IExtFunction,ICourseTeacherService,ICourseTeacherConstant{

	public void md5Password(CourseTeacher t){
		md5Password(t.getPassword(),t::setPassword);
	}

	@Transactional
	public Long saveCourseTeacher(CourseTeacher t) {
		md5Password(t);
		return super.saveCourseTeacher(t);
	}
	
	@Transactional
	public boolean updCourseTeacher(CourseTeacher t) {
		md5Password(t);
		return super.updCourseTeacher(t);
	}
}